#ifndef TEXTURE_LIBRARY_H_
#define TEXTURE_LIBRARY_H_

#include "Logger.hpp"
#include <map>
#include <QImage.h>
#include <QtOpenGL>
#include <stdio.h>
#include <iostream>

class Texture
{
public:
	Texture( std::string name );
	
	void bind();
	void unbind();
	
	bool isLoaded() const { return m_isLoaded; }
	void setLoaded( bool loaded ) { m_isLoaded = loaded; }
	
	void setUseMipMaps( bool mip );
	bool usesMipMaps() const { return m_useMipMaps; }
	
public:
	QImage image;
	GLuint glId;
	
	std::string filename;
	
protected:
	bool m_isInUse;
	bool m_isLoaded;
	bool m_useMipMaps;
};


Texture* getTexture( std::string filename );

#endif
